﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{
    public partial class ClassDataDto
    {
        public System.Int64 classId { get; set; }

        /// <summary>
        /// 收银员名称
        /// </summary>
        public System.String userName { get; set; }

        /// <summary>
        /// 交班单号
        /// </summary>
        public System.String classNumber { get; set; }

        /// <summary>
        /// 首单时间
        /// </summary>
        public System.DateTime starDate { get; set; }

        /// <summary>
        /// 首单时间
        /// </summary>
        public System.DateTime createTime { get; set; }

        /// <summary>
        /// 末单时间
        /// </summary>
        public System.DateTime endDate { get; set; }

        /// <summary>
        /// 餐段
        /// </summary>
        public System.String marketName { get; set; }

        /// <summary>
        /// 总单数
        /// </summary>
        public System.Decimal allCount { get; set; }

        /// <summary>
        /// 总人数
        /// </summary>
        public System.Decimal allPerson { get; set; }

        /// <summary>
        /// 总商品数
        /// </summary>
        public System.Decimal allFoodCount { get; set; }

        /// <summary>
        /// 退商品数
        /// </summary>
        public System.Decimal refundFoodCount { get; set; }

        /// <summary>
        /// 应收合计
        /// </summary>
        public System.Decimal sumShouldAmount { get; set; }

        /// <summary>
        /// 实收合计
        /// </summary>
        public System.Decimal sumRealAmount { get; set; }

        /// <summary>
        /// 营业合计
        /// </summary>
        public System.Decimal sumAllAmount { get; set; }

        /// <summary>
        /// 优惠金额
        /// </summary>
        public System.Decimal sunReduceAmount { get; set; }

        /// <summary>
        /// 钱箱金额
        /// </summary>
        public System.Decimal? cashBoxMoney { get; set; }

        /// <summary>
        /// 现金金额
        /// </summary>
        public System.Decimal? cashSumAmount { get; set; }

        /// <summary>
        /// 现金合计（钱箱金额+现金金额）
        /// </summary>
        public System.Decimal? cashAllAmount { get; set; }

        /// <summary>
        /// 反结账单数
        /// </summary>
        public System.Int32 settlementUn { get; set; }

        /// <summary>
        /// 会员充值笔数
        /// </summary>
        public System.Int32 sum_depCount { get; set; }


        /// <summary>
        /// 余额消费笔数
        /// </summary>
        public System.Int32 Sum_consumeCount { get; set; }

        /// <summary>
        /// 余额消费金额
        /// </summary>
        public System.Decimal sum_consumeAmount { get; set; }

        /// <summary>
        /// 折扣金额
        /// </summary>
        public System.Decimal sumDiscountAmount { get; set; }

        /// <summary>
        /// 抹零金额
        /// </summary>
        public System.Decimal sumFloorAmount { get; set; }

        /// <summary>
        /// 减免金额
        /// </summary>
        public System.Decimal sumFreeAmount { get; set; }

        /// <summary>
        /// 消费金额
        /// </summary>
        public List<Consumption> Consumption { get; set; }

        /// <summary>
        /// 会员充值金额
        /// </summary>
        public List<userDeposit> userDeposits { get; set; }

        /// <summary>
        /// 付款方式统计
        /// </summary>
        public List<ClassPayment> payments { get; set; }

        /// <summary>
        /// 商品分类统计
        /// </summary>
        public List<ClassFoodType> foodTypes { get; set; }

        /// <summary>
        /// 商品部门统计
        /// </summary>
        public List<ClassDeparts> departList { get; set; }

        /// <summary>
        /// 打印消费合计金额
        /// </summary>
        public System.Decimal sum_posAmount { get; set; }
        /// <summary>
        /// 打印充值合计金额
        /// </summary>
        public System.Decimal sum_depAmount { get; set; }
        /// <summary>
        /// 打印汇总合计金额
        /// </summary>
        public System.Decimal sum_allAmount { get; set; }

        /// <summary>
        /// 会员赠送金额 
        /// </summary>
        public System.Decimal userGiftAmount { get; set; }

        /// <summary>
        /// 赠送品数
        /// </summary>
        public System.Decimal presentCount { get; set; }

        /// <summary>
        /// 赠送金额
        /// </summary>
        public System.Decimal presentAmount { get; set; }

        /// <summary>
        /// 单均价
        /// </summary>
        public System.Decimal avgBillPrice { get; set; } = 0;

        /// <summary>
        /// 人均价
        /// </summary>
        public System.Decimal avgPersonPrice { get; set; } = 0;

        /// <summary>
        /// 退菜数量
        /// </summary>
        public System.Decimal refundQuantity { get; set; }

        /// <summary>
        /// 退菜金额
        /// </summary>
        public System.Decimal refundAmount { get; set; }
    }

    public partial class Consumption
    {
        public System.Int64 classId { get; set; }

        /// <summary>
        /// 付款方式
        /// </summary>
        public System.Int32 paymentId { get; set; }
        /// <summary>
        /// 付款方式
        /// </summary>
        public System.String payMentName { get; set; }

        /// <summary>
        /// 消费笔数
        /// </summary>
        public System.Int32 payCount { get; set; }

        /// <summary>
        /// 消费金额
        /// </summary>
        public System.Decimal Amount { get; set; }

        public System.String orderNo { get; set; }

        ///// <summary>
        ///// 合计
        ///// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "allAmount")]
        //public System.Decimal allAmount { get; set; }
    }
    public partial class userDeposit
    {
        public System.Int64 classId { get; set; }
        /// <summary>
        /// 付款方式
        /// </summary>
        public System.Int32 paymentId { get; set; }
        /// <summary>
        /// 付款方式
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "payMent")]
        public System.String payMentName { get; set; }

        /// <summary>
        /// 充值笔数
        /// </summary>
        public System.Int32 Count { get; set; }

        /// <summary>
        /// 充值金额
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "Amount")]
        public System.Decimal Amount { get; set; }

        /// <summary>
        /// 赠送金额
        /// </summary>
        [SugarColumn(ColumnName = "giftAmount", DecimalDigits = 2)]
        public System.Decimal giftAmount { get; set; }
        ///// <summary>
        ///// 合计
        ///// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "allAmount")]
        //public System.Decimal allAmount { get; set; }
    }

    public partial class ClassPayment
    {
        /// <summary>
        /// 交班单号
        /// </summary>
        public System.String payName { get; set; }

        /// <summary>
        /// 消费金额
        /// </summary>
        public System.Decimal posAmount { get; set; }

        /// <summary>
        /// 次数
        /// </summary>
        public System.Int32 payCount { get; set; }

        /// <summary>
        /// 会员充值
        /// </summary>
        public System.Decimal depAmount { get; set; }

        /// <summary>
        /// 合计金额
        /// </summary>        
        public System.Decimal allAmount { get; set; }

    }


    /// <summary>
    /// 商品分类统计
    /// </summary>
    public partial class ClassFoodType
    {
        /// <summary>
        /// 交班单号
        /// </summary>
        public System.String typeName { get; set; }

        /// <summary>
        /// 消费金额
        /// </summary>
        public System.Decimal typeQuantity { get; set; }

        /// <summary>
        /// 会员充值
        /// </summary>
        public System.Decimal typePrice { get; set; }

        /// <summary>
        /// 合计金额
        /// </summary>        
        public System.Decimal typeAmount { get; set; }

        /// <summary>
        /// 合计实收
        /// </summary>        
        public System.Decimal typeRealAmount { get; set; }

    }

    /// <summary>
    /// 商品分类统计
    /// </summary>
    public partial class ClassDeparts
    {
        /// <summary>
        /// 名称
        /// </summary>
        public System.String dptName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public System.Decimal dptQuantity { get; set; }

        /// <summary>
        /// 均价
        /// </summary>
        public System.Decimal dptPrice { get; set; }

        /// <summary>
        /// 金额
        /// </summary>        
        public System.Decimal dptAmount { get; set; }

        /// <summary>
        /// 实收金额
        /// </summary>        
        public System.Decimal dptRealAmount { get; set; }

    }


    public partial class TypeModel
    {
        /// <summary>
        /// 交班单号
        /// </summary>
        public System.String name { get; set; }

        /// <summary>
        /// 消费金额
        /// </summary>
        public System.Decimal quantity { get; set; }

        /// <summary>
        /// 合计金额
        /// </summary>        
        public System.Decimal amount { get; set; }

    }

}